//集中管理商品相关数据请求
import request from '../utils/request'

// 商品列表
export const productGetApi = ()=>{
  return request.get('/fanji',{
    params:{},
    headers:{}
  })
}

// 商品查询
export const productSearchApi = ({pname})=>{
  return request.get('/fanji/search',{
    params:{
      keyword:pname
    }
  })
}

//商品删除
export const productDelApi = (id)=>{
  return request.delete('/fanji/fanji',{
    params:{
      id
    }
  })
}

//商品更新
export const productPutApi = (id,editData)=>{
  return request.put('/fanji/fanji',editData,{
    params:{id}
  })
}
//图表数据
export const bubbleGetApi = ()=>{
  return request.get('/chart')
}